#include <stdio.h>

int main(int argc, char const *argv[])
{
	int a=1,b=2,t;
	double sum=0;
	for(;b<=4000000;)
	{
		if(b%2==0) sum+=b;
		t=a;
		a=b;
		b+=t;
	}
	printf("%.0f\n", sum);
	return 0;
}